<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui" 
	template="/template/template.xhtml">	
	<ui:define name="center">
	<p:panel header="#{bookBean.book.title}">
		<h:form id="single-book">  
			 <p:graphicImage value="#{bookBean.coverPath}#{bookBean.book.id}"/>   
	     	 <br/><h:outputText value="#{bookBean.book.date}" />      
		     <h:commandLink value="#{book.category.title}" action="#{bookListBean.searchBooksByCategory(book.category)}" />
		     <br/><h:outputText value="#{bookBean.book.price}€" />
			 <br/><h:outputText value="Auteur(s) :"/>	
			 <ui:repeat value="#{bookBean.bookAuthors}" var="author">  
			 	<h:outputText value="#{author.firstName} #{author.lastName}"/>	 
			 </ui:repeat>
	    </h:form> 
	    <br/>
	    <div class="clearer"></div>
	    <h:form id="addToOrder">
			<p:commandButton value="#{msg['book.addcart']}" action="#{orderManagedBean.addBook(bookBean.book)}" ajax="false" />
		</h:form>
	</p:panel>
	</ui:define>	
</ui:composition>
